package com.example.Extension.Event;

import com.example.Extension.ApplicationListener.Configuration;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Description TODO
 * @Date 2024/6/3 13:15
 * @Created by houjunfeng
 */
public class Test {
    @org.junit.Test
    public void test(){
        AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(EventConfiguration.class);
        Publish publish = annotationConfigApplicationContext.getBean(Publish.class);
        publish.publish();
        annotationConfigApplicationContext.close();
    }
}
